Optimal. Leaf size=83 \[ -\frac {i d^2 \text {Li}_2\left (e^{2 i (a+b x)}\right )}{b^3}+\frac {2 d (c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {(c+d x)^2 \cot (a+b x)}{b}-\frac {i (c+d x)^2}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {4184, 3717, 2190, 2279, 2391} \[ -\frac {i d^2 \text {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^3}+\frac {2 d (c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {(c+d x)^2 \cot (a+b x)}{b}-\frac {i (c+d x)^2}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3717
Rule 4184
Rubi steps
\begin {align*} \int (c+d x)^2 \csc ^2(a+b x) \, dx &=-\frac {(c+d x)^2 \cot (a+b x)}{b}+\frac {(2 d) \int (c+d x) \cot (a+b x) \, dx}{b}\\ &=-\frac {i (c+d x)^2}{b}-\frac {(c+d x)^2 \cot (a+b x)}{b}-\frac {(4 i d) \int \frac {e^{2 i (a+b x)} (c+d x)}{1-e^{2 i (a+b x)}} \, dx}{b}\\ &=-\frac {i (c+d x)^2}{b}-\frac {(c+d x)^2 \cot (a+b x)}{b}+\frac {2 d (c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {\left (2 d^2\right ) \int \log \left (1-e^{2 i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac {i (c+d x)^2}{b}-\frac {(c+d x)^2 \cot (a+b x)}{b}+\frac {2 d (c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b^2}+\frac {\left (i d^2\right ) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{b^3}\\ &=-\frac {i (c+d x)^2}{b}-\frac {(c+d x)^2 \cot (a+b x)}{b}+\frac {2 d (c+d x) \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {i d^2 \text {Li}_2\left (e^{2 i (a+b x)}\right )}{b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 4.19, size = 181, normalized size = 2.18 \[ \frac {\csc (a) \left (b^2 \sin (b x) (c+d x)^2 \csc (a+b x)+d^2 \left (-b^2 x^2 \cos (a) e^{i \tan ^{-1}(\tan (a))} \sqrt {\sec ^2(a)}-\sin (a) \left (i \text {Li}_2\left (e^{2 i \left (b x+\tan ^{-1}(\tan (a))\right )}\right )-i b x \left (\pi -2 \tan ^{-1}(\tan (a))\right )-2 \left (\tan ^{-1}(\tan (a))+b x\right ) \log \left (1-e^{2 i \left (\tan ^{-1}(\tan (a))+b x\right )}\right )+2 \tan ^{-1}(\tan (a)) \log \left (\sin \left (\tan ^{-1}(\tan (a))+b x\right )\right )-\pi \log \left (1+e^{-2 i b x}\right )+\pi \log (\cos (b x))\right )\right )-2 b c d (b x \cos (a)-\sin (a) \log (\sin (a+b x)))\right )}{b^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.80, size = 379, normalized size = 4.57 \[ \frac {-i \, d^{2} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + i \, d^{2} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + i \, d^{2} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - i \, d^{2} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + {\left (b d^{2} x + b c d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + {\left (b d^{2} x + b c d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + {\left (b c d - a d^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) + {\left (b c d - a d^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) + {\left (b d^{2} x + a d^{2}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + {\left (b d^{2} x + a d^{2}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) - {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \cos \left (b x + a\right )}{b^{3} \sin \left (b x + a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{2} \csc \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.07, size = 276, normalized size = 3.33 \[ -\frac {2 i \left (d^{2} x^{2}+2 c d x +c^{2}\right )}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}+\frac {2 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b^{2}}-\frac {4 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{2}}-\frac {2 i d^{2} x^{2}}{b}-\frac {4 i d^{2} a x}{b^{2}}-\frac {2 i d^{2} a^{2}}{b^{3}}+\frac {2 d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b^{2}}-\frac {2 i d^{2} \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}-\frac {2 i d^{2} \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {4 d^{2} a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 d^{2} a \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.51, size = 555, normalized size = 6.69 \[ -\frac {2 \, b^{2} c^{2} + {\left (2 \, b d^{2} x + 2 \, b c d - 2 \, {\left (b d^{2} x + b c d\right )} \cos \left (2 \, b x + 2 \, a\right ) - {\left (2 i \, b d^{2} x + 2 i \, b c d\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - {\left (2 \, b c d \cos \left (2 \, b x + 2 \, a\right ) + 2 i \, b c d \sin \left (2 \, b x + 2 \, a\right ) - 2 \, b c d\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) + {\left (2 \, b d^{2} x \cos \left (2 \, b x + 2 \, a\right ) + 2 i \, b d^{2} x \sin \left (2 \, b x + 2 \, a\right ) - 2 \, b d^{2} x\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (2 \, d^{2} \cos \left (2 \, b x + 2 \, a\right ) + 2 i \, d^{2} \sin \left (2 \, b x + 2 \, a\right ) - 2 \, d^{2}\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + {\left (2 \, d^{2} \cos \left (2 \, b x + 2 \, a\right ) + 2 i \, d^{2} \sin \left (2 \, b x + 2 \, a\right ) - 2 \, d^{2}\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) - {\left (i \, b d^{2} x + i \, b c d + {\left (-i \, b d^{2} x - i \, b c d\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b d^{2} x + b c d\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (i \, b d^{2} x + i \, b c d + {\left (-i \, b d^{2} x - i \, b c d\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b d^{2} x + b c d\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (-2 i \, b^{2} d^{2} x^{2} - 4 i \, b^{2} c d x\right )} \sin \left (2 \, b x + 2 \, a\right )}{-i \, b^{3} \cos \left (2 \, b x + 2 \, a\right ) + b^{3} \sin \left (2 \, b x + 2 \, a\right ) + i \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (c+d\,x\right )}^2}{{\sin \left (a+b\,x\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{2} \csc ^{2}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________